//
//  BottomView.m
//  Civacrm
//
//  Created by zhk on 2017/2/15.
//  Copyright © 2017年 王桂敏. All rights reserved.
//

#import "BottomView.h"
#import "UIButton+ImageTitleSpacing.h"

@interface BottomView ()


@end

@implementation BottomView

+ (BottomView * )initBottomViewWithFrame:(CGRect)frame andActivateNumString:(NSString *)activateNum andPayForNumString:(NSString *)payForNum
{
    BottomView * view = [[BottomView alloc]init];
    view.backgroundColor = ColorWithHexString(@"6bd2f5");
    view.frame = frame;
    view.alpha = 0.9;
    UIButton * btn = [UIButton buttonOfVerticalOForNormalWithImage:@"icon_wodepaiming" title:@"我的排名" frame:CGRectMake(w(11), 0, w(66) + w(58), frame.size.height) target:nil action:nil titleColor:[UIColor grayColor] backgroudColor:ClearColor font:font(20)];
    [view addSubview:btn];

    
    UILabel * lineLabel = [UILabel labelWithTitle:nil frame:CGRectMake(getMaxX(btn) + w(10), frame.size.height / 5, 1, (frame.size.height / 5) * 3) font:font(20) textColor:[UIColor grayColor] bgColor:[UIColor grayColor]];
    [view addSubview:lineLabel];
    
    
    
    btn.titleLabel.font = [UIFont systemFontOfSize:9];
    [btn setTitleColor:ColorWithHexString(@"4e778f") forState:(UIControlStateNormal)];
    
    UILabel * frontLabel = [[UILabel alloc]init];
    [view addSubview:frontLabel];
    frontLabel.textColor = [UIColor whiteColor];
    frontLabel.font = font(24);
    
    frontLabel.frame = CGRectMake(w(201), 0, (kScreenWidth - w(201)) / 2, frame.size.height);

    frontLabel.text = activateNum;
    
    UILabel *behindLabel = [[UILabel alloc]init];
    [view addSubview:behindLabel];
    behindLabel.textColor = [UIColor whiteColor];
    behindLabel.font = font(24);
    behindLabel.frame = CGRectMake(getMaxX(frontLabel), 0, frontLabel.width, frame.size.height);

    behindLabel.text = payForNum;
    
    return view;
}

- (void)layoutSubviews{
    [super layoutSubviews];
    
}

@end
